package com.mobilereports.sort;

import java.util.Comparator;

import com.mobilereports.model.Sample;

public class ValuesDescendingComparator implements Comparator<Sample>
{
	public static final String SORT_ORDER_NAME = "Values desc.";

	@Override
	public int compare(Sample object1, Sample object2)
	{
		if(object1.getValue() > object2.getValue())
			return -1; 
		else if(object1.getValue() < object2.getValue())
			return 1;
		return 0;
	}

	@Override
	public String toString()
	{
		return SORT_ORDER_NAME;
	}
}
